![]() | Integration by the Runtime Engine (Windows) | User defined DLL commands | ![]() |
XpertRule applications can utilise Dynamic Link Libraries. DLL's are compiled programming code units that can be called (executed) to perform their designated function(s) on demand. Although this is similar in concept to calling an external conventional program, an important difference is that once first 'opened' a DLL can remain in memory and be called (the functions reused) without needing to be loaded upon each call. In addition, more than one program can call the same memory resident DLL. Hence, both speed and efficient use of available RAM is maximised.
DLL's also have a formal method for data passing between your application program and the DLL's that it calls. A dynamic link library can hold any number of named functions. Once the DLL is opened, the developer can then call a specific function by name, passing a list of values to it, and receiving the result back. DLL's can also be utilised to call the Windows API.
XpertRule has specific @commands to operate DLL's:
@DLLopen
Can be used to open a Dynamic Link Library, and list the named functions to be used. The developer can specify an Alias name in order to use their preferred term within XpertRule, or should a function name in one DLL clash with another DLL, rather than the function name imposed by the DLL. The list and type of parameters to be passed, and data type of the result received back, is also defined using this command.
@DLLcall
This is used to call a named function (by its DLL name or by an Alias). The variables being passed, and the receiving variable for the returned value, are listed after the @DLLcall command.
@DLLclose
When your application no longer needs a DLL, this command will remove it from memory. Therefore, this need only be used when the DLL is not being used repeatedly (to free memory), or you are closing your application.
See the command sections for the actual mechanics of the @DLLopen, @DLLcall and @DLLclose commands.